package cn.seaboot.admin.user.bean;

import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * POJO
 * 用户 [t_sys_user]
 * <p>
 *
 * @author Mr.css on 2018-6-20
 */
@Schema(description = "用户 [t_sys_user] 实体类")
public class User implements Serializable {
    private static final long serialVersionUID = 5749218842662705823L;
    /**
     * ID
     */
    @Schema(description = "ID")
    private String id;
    /**
     * 用户编码
     */
    @NotNull()
    @Size( max = 32)
    @Schema(description = "用户编码")
    private String account;

    /**
     * 用户状态
     */
    @Schema(description = "用户状态")
    private Integer status;

    /**
     * 昵称
     */
    @Size( max = 32)
    @Schema(description = "昵称")
    private String username;
    /**
     * 电话
     */
    @Size( max = 16)
    @Schema(description = "电话")
    private String phone;
    /**
     * 性别(1/男；0/女)
     */
    @Schema(description = "性别(1/男；0/女)")
    private Boolean gender;
    /**
     * 头像
     */
    @Size( max = 100)
    @Schema(description = "头像")
    private String portrait;
    /**
     * 电子邮箱
     */
    @Size( max = 255)
    @Schema(description = "电子邮箱")
    private String email;
    /**
     * 是否可用
     */
    @NotNull()
    @Schema(description = "是否可用")
    private Boolean disabled;
    /**
     * 密码
     */
    @NotNull()
    @Size( max = 32)
    @Schema(description = "密码")
    private String password;
    /**
     * 盐值
     */
    @NotNull()
    @Size( max = 32)
    @Schema(description = "盐值")
    private String passwordSalt;
    /**
     * 机构
     */
    @NotNull()
    @Schema(description = "机构")
    private String orgId;
    /**
     * 用户分组(默认普通用户)
     */
    @NotNull()
    @Schema(description = "用户分组(默认普通用户)")
    private String deptId;
    /**
     * 用户分组(默认普通用户)
     */
    @NotNull()
    @Schema(description = "用户分组(默认普通用户)")
    private String deptName;
    /**
     * 创建时间
     */
    @NotNull()
    @Schema(description = "创建时间")
    private LocalDateTime gmtCreate;
    /**
     * 修改日期
     */
    @NotNull()
    @Schema(description = "修改日期")
    private LocalDateTime gmtModified;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Boolean getGender() {
        return gender;
    }

    public void setGender(Boolean gender) {
        this.gender = gender;
    }

    public String getPortrait() {
        return portrait;
    }

    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Boolean getDisabled() {
        return disabled;
    }

    public void setDisabled(Boolean disabled) {
        this.disabled = disabled;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPasswordSalt() {
        return passwordSalt;
    }

    public void setPasswordSalt(String passwordSalt) {
        this.passwordSalt = passwordSalt;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public LocalDateTime getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(LocalDateTime gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", account='" + account + '\'' +
                ", status=" + status +
                ", username='" + username + '\'' +
                ", phone='" + phone + '\'' +
                ", gender=" + gender +
                ", portrait='" + portrait + '\'' +
                ", email='" + email + '\'' +
                ", disabled=" + disabled +
                ", password='" + password + '\'' +
                ", passwordSalt='" + passwordSalt + '\'' +
                ", orgId='" + orgId + '\'' +
                ", deptId='" + deptId + '\'' +
                ", deptName='" + deptName + '\'' +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                '}';
    }
}
